package pack1;

import java.util.List;
import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;

public class sprg19 {
public static void main(String[] args) {
	WebDriver driver=new FirefoxDriver();
	driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
	driver.get("http://www.yatra.com");
	 List<WebElement> allLink = driver.findElements(By.tagName("a"));
	int lintCount=allLink.size();
	System.out.println("link counts: "+lintCount);
	for(int i=0;i<lintCount;i++)
	{ 
		String LinkName=allLink.get(i).getText();
		if(LinkName.equals(" "))
		{continue;}else
		System.out.println(LinkName);
	}
	
	
}
}
